/*
 * Copyright (c) 2017, dhl and/or its affiliates. All rights reserved.
 * dhl PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 */
package com.xd.cloud.entity.core;

import java.util.Date;

import javax.persistence.*;

import com.xd.cloud.entity.BaseEntity;

/**
 * 用户
 * 
 * @author dhl
 * @since V1.0
 * 
 */
@Entity
@Table(name = "sys_user")
public class User extends BaseEntity {
	
	//登录账号
	private String account;
	//用户名称
	private String name;
	//登录密码
	private String password;
	//创建时间
	private Date createtime;
	//修改时间
	private Date updatetime;
	//使用状态,0为正常,1为禁用或停用,2为删除
	private int status;

	@Transient
	private String dataRule;

	public String getDataRule() {
		return dataRule;
	}

	public void setDataRule(String dataRule) {
		this.dataRule = dataRule;
	}

	/**
	 * 父亲id值
	 */
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "parentid")
	private User user;

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	public String getAccount() {
		return account;
	}
	public void setAccount(String account) {
		this.account = account;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Date getCreatetime() {
		return createtime;
	}
	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
	public Date getUpdatetime() {
		return updatetime;
	}
	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	

}
